/*
 * Decompiled with CFR 0.150.
 * 
 * Could not load the following classes:
 *  de.felixroske.jfxsupport.FXMLController
 *  javafx.fxml.FXML
 *  javafx.fxml.Initializable
 *  javafx.scene.control.TextField
 *  javafx.scene.layout.AnchorPane
 *  org.springframework.beans.factory.annotation.Autowired
 */
package com.gys.controller.replenish;

import com.gys.controller.BaseController;
import com.gys.controller.index.IndexController;
import com.gys.controller.replenish.AddReplenishController;
import de.felixroske.jfxsupport.FXMLController;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.TextField;
import javafx.scene.layout.AnchorPane;
import org.springframework.beans.factory.annotation.Autowired;

@FXMLController
public class SearchProductController
extends BaseController
implements Initializable {
    @FXML
    private AnchorPane pane;
    @FXML
    private TextField productCode;
    @Autowired
    private AddReplenishController addReplenishController;
    @Autowired
    private IndexController indexController;

    public void initialize(URL location, ResourceBundle resources) {
    }

    @FXML
    private void search() {
        this.addReplenishController.doSearch(this.productCode.getText());
        this.productCode.setText("");
        this.pane.getScene().getWindow().hide();
    }

    public AnchorPane getPane() {
        return this.pane;
    }

    public TextField getProductCode() {
        return this.productCode;
    }

    public AddReplenishController getAddReplenishController() {
        return this.addReplenishController;
    }

    public IndexController getIndexController() {
        return this.indexController;
    }

    public void setPane(AnchorPane pane) {
        this.pane = pane;
    }

    public void setProductCode(TextField productCode) {
        this.productCode = productCode;
    }

    public void setAddReplenishController(AddReplenishController addReplenishController) {
        this.addReplenishController = addReplenishController;
    }

    public void setIndexController(IndexController indexController) {
        this.indexController = indexController;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof SearchProductController)) {
            return false;
        }
        SearchProductController other = (SearchProductController)o;
        if (!other.canEqual(this)) {
            return false;
        }
        AnchorPane this$pane = this.getPane();
        AnchorPane other$pane = other.getPane();
        if (this$pane == null ? other$pane != null : !this$pane.equals(other$pane)) {
            return false;
        }
        TextField this$productCode = this.getProductCode();
        TextField other$productCode = other.getProductCode();
        if (this$productCode == null ? other$productCode != null : !this$productCode.equals(other$productCode)) {
            return false;
        }
        AddReplenishController this$addReplenishController = this.getAddReplenishController();
        AddReplenishController other$addReplenishController = other.getAddReplenishController();
        if (this$addReplenishController == null ? other$addReplenishController != null : !(this$addReplenishController).equals(other$addReplenishController)) {
            return false;
        }
        IndexController this$indexController = this.getIndexController();
        IndexController other$indexController = other.getIndexController();
        return !(this$indexController == null ? other$indexController != null : !(this$indexController).equals(other$indexController));
    }

    protected boolean canEqual(Object other) {
        return other instanceof SearchProductController;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        AnchorPane $pane = this.getPane();
        result = result * 59 + ($pane == null ? 43 : $pane.hashCode());
        TextField $productCode = this.getProductCode();
        result = result * 59 + ($productCode == null ? 43 : $productCode.hashCode());
        AddReplenishController $addReplenishController = this.getAddReplenishController();
        result = result * 59 + ($addReplenishController == null ? 43 : ($addReplenishController).hashCode());
        IndexController $indexController = this.getIndexController();
        result = result * 59 + ($indexController == null ? 43 : ($indexController).hashCode());
        return result;
    }

    public String toString() {
        return "SearchProductController(pane=" + this.getPane() + ", productCode=" + this.getProductCode() + ", addReplenishController=" + this.getAddReplenishController() + ", indexController=" + this.getIndexController() + ")";
    }
}

